//    Copyright (C) Clear Office.  All rights reserved.
using System;
using Office.Core.Serialization;

namespace Office.Spreadsheet.PivotTable
{
    class PivotCache: IOfficeXmlSerializable
    {
        #region IOfficeXmlSerializable Members

        void IOfficeXmlSerializable.ReadXml(ReadContext context)
        {
            using (ReadContext c = context.Read("pivotCache"))
            {
                CacheId = c.GetInteger("cacheId");
                this.Id = c.GetString(OfficeConstants.RelationshipNamespace + "id");
            }
        }

        void IOfficeXmlSerializable.WriteXml(WriteContext context)
        {
            using (var c = context.Write("pivotCache"))
            {
                c.SetInteger("cacheId", CacheId);
                    c.SetString(OfficeConstants.RelationshipNamespace + "id", Id);
                
            }
        }

        #endregion

        private int _cacheId;

        public int CacheId
        {
            get { return _cacheId; }
            set { _cacheId = value; }
        }

        public string Id;
	
	
    }
}
